from selenium import webdriver
import time
from selenium.webdriver.common.by import By


#驱动
diver=webdriver.Edge()
diver.maximize_window()
diver.get('https://www.ctrip.com/')
time.sleep(2)

#点击登录
diver.find_element(By.XPATH,'//*[@id="hp_nfes_accountbar"]/li[1]/div/button/div/span').click()

#勾选协议
diver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[4]/div/div[1]/label').click()

#输入账号
diver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[1]/dd/input').send_keys('17733058407')

#输入密码
diver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[2]/dd/input').send_keys('lcf10140910')

#登录
diver.find_element(By.XPATH,'//*[@id="bbz_accounts_pc_lg_box"]/div/div/div[1]/div[1]/form/dl[3]/dd/input').click()